package com.link.base.base.questionsurvey.service;

import com.link.base.base.user.model.User;
import com.link.base.base.questionsurvey.model.Question;
import com.link.base.base.questionsurvey.model.QuestionAnswer;
import com.link.core.basic.service.BasicService;

import java.util.List;

/**
 * @author unknown
 * @date unknown
 * @comments 问卷操作服务
 */
public interface QuestionService extends BasicService<Question> {

    /**
     * 分页查询用户
     * @param entity 用户
     * @return 用户列表
     * @throws Exception
     */
    public List<User> queryUserFillInPage(User entity) throws Exception;

    /**
     * 分页查询问卷列表
     * @param entity 问卷
     * @return 问卷列表
     * @throws Exception
     */
    public List<Question> queryQuestionSurveyPage(Question entity) throws Exception;

    /**
     * 发布出去的问卷列表
     * @param entity 问卷
     * @param userId 用户id
     * @return 问卷列表
     * @throws Exception
     */
    public List<Question> queryQuestionByUserPage(Question entity, Long userId) throws Exception;

    /**
     * 根据Id查询调查文件结果信息
     *
     * @param id
     * @return 问卷
     * @throws Exception
     */
    public Question queOneQuestionDetailInfo(Long id) throws Exception;


    //public List<Question> queryQuestionListWithAnsReport(Question qu) throws Exception;
    /*
     * 查询问卷列表总记录数
     * */
    //public int queryCountQuestion(Question qu) throws Exception;
    /**
     * 查询问卷明细
     * @param qu 问卷
     * @return 问卷
     * @throws Exception
     */
    public Question queryQuestionItem(Question qu) throws Exception;

    /**
     * 增加问卷、答题、投票的标题
     * @param qu
     * @throws Exception
     */
    public void questionTitleInsert(Question qu) throws Exception;

    /**
     * 增加答题
     * @param qu
     * @throws Exception
     */
    public void answerInsert(QuestionAnswer qu) throws Exception;

}
